<template>
	<view class="agenda_list">
		<view class="agendaItem"  v-for="(item, index) in agendaList" :key="item.id">
			<view class="name">
				<view id="index">审议事项{{index+1}}：</view>
				<view>表决规则：</view>
				<view>议题材料：</view>
			</view>
			<view class="value">
				<view><text @click="openAgenda(item)">{{item.agendaName}}</text></view>
				<view>{{item.agendaRule}}</view>
				<view  v-for="(agendaAtt, index) in item.agendaAttList"  :key="index">
					<text @click="openAttach(`http://192.168.250.14/vue/index-mo.html?url=http://192.168.250.14/api/mobileoffice/mobile/opendoc`)">{{agendaAtt.name}}</text>
				</view>
			</view>
			<view class="operation">
				<u-button type="primary" size="large" text="表决结果"  @click="navigator(item.id)"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['agendaList'],
		methods: {
			navigator (id) {
				this.$emit('agendaItemClick',id)
			},
			openAgenda (item) {
				this.$emit('openAgenda',item)
			},
			openAttach(url){
				uni.navigateTo({
				  url: `/pages/fileEdit?url=`+url,
				});
			}
		}
	}
</script>

<style lang="scss">
	@import "@/static/css/_px2vw.scss";
	.agendaItem {
		display: flex;
		font-size: vw(18);
		margin-top: vw(3);
		border-bottom:solid #DDDDDD vw(1);
		padding: vw(15);
		.name{
			text-align:right;
			font-weight: bold;
			width: 20%;
			view{
				margin-top: vw(25);
			}
			#index{
				font-size: vw(18);
			}
		}
		.value{
			width: 60%;
			display:gird;
			view{
				font-size: vw(16);
				margin-top: vw(28);
			}
		}
		.operation{
			width: 9%;
			display:gird;
			uni-button{
				height: vw(29);
				margin-top: vw(23);
				/deep/ uni-text{
					font-size:vw(13) !important;
				}
			}
		}
	}
</style>
